/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2012/07/16
* File: Dimension2D.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#ifndef Dimension2D_h__
#define Dimension2D_h__

#include "Rfstd.h"

template <typename T>
class Dimension2D
{
public:
	Dimension2D()
		: _width(0)
		, _height(0)
	{

	}

	Dimension2D(T width, T height)
		: _width(width)
		, _height(height)
	{

	}

	bool operator==(const Dimension2D& other) const
	{
		return (equals(_width, other._width)
			&& equals(_height, other._height));
	}

public:
	T		_width;
	T		_height;
};

typedef Dimension2D<f32> Dimension2Df;
typedef Dimension2D<f64> Dimension2Dd;
typedef Dimension2D<s32> Dimension2Di;
typedef Dimension2D<u32> Dimension2Du;

#endif    /* Dimension2D_h__ */